More CMake code review feedback
This commit is contained in:
parent
9f80ffa4dc
commit
daf4311228
@ -53,6 +53,7 @@ source_group(${PROJECT_NAME} REGULAR_EXPRESSION DirectXTex/*.*)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC DirectXTex)
|
||||
|
||||
if(MSVC)
|
||||
# Use max Warning Level
|
||||
string(REPLACE "/W3 " "/Wall " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/W3 " "/Wall " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
||||
@ -62,6 +63,7 @@ string(REPLACE "/W3 " "/Wall " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE
|
||||
string(REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
||||
string(REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
||||
endif()
|
||||
|
||||
add_executable(texassemble texassemble/texassemble.cpp)
|
||||
target_link_libraries(texassemble ${PROJECT_NAME})
|
||||
@ -75,6 +77,7 @@ add_executable(texdiag texdiag/texdiag.cpp)
|
||||
target_link_libraries(texdiag ${PROJECT_NAME})
|
||||
source_group(texdiag REGULAR_EXPRESSION texdiag/*.*)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE /fp:fast)
|
||||
target_compile_options(texassemble PRIVATE /fp:fast)
|
||||
target_compile_options(texconv PRIVATE /fp:fast)
|
||||
@ -86,6 +89,7 @@ if (${CMAKE_SIZEOF_VOID_P} EQUAL "4")
|
||||
target_compile_options(texconv PRIVATE /arch:SSE2)
|
||||
target_compile_options(texdiag PRIVATE /arch:SSE2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
set(WarningsLib "-Wpedantic" "-Wextra")
|
||||
|
Loading…
Reference in New Issue
Block a user