build: reorganize CMake settings for better clarity (#23)
Streamline CMake configuration by consolidating compiler options and ensuring consistent export of compile commands, enhancing the build process especially for MSVC and Windows environments.
This commit is contained in:
parent
10153950c8
commit
e83c3ce8fe
@ -88,18 +88,18 @@ if(AIMRT_MASTER_PROJECT)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
add_compile_options(/utf-8 /wd4819)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
add_compile_definitions(NOMINMAX)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
add_compile_options(/utf-8 /wd4819)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_compile_definitions(NOMINMAX)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Build document
|
# Build document
|
||||||
if(AIMRT_BUILD_DOCUMENT)
|
if(AIMRT_BUILD_DOCUMENT)
|
||||||
message(STATUS "gen document ...")
|
message(STATUS "gen document ...")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user