Skip to content

Commit

Permalink
Test flags only for test project
Browse files Browse the repository at this point in the history
  • Loading branch information
GabTux committed Apr 6, 2024
1 parent d5aace8 commit 0de8aa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions all/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(../cmake/tools.cmake)
# needed to generate test target
enable_testing()

add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../standalone ${CMAKE_BINARY_DIR}/standalone)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../test ${CMAKE_BINARY_DIR}/test)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../benchmark ${CMAKE_BINARY_DIR}/benchmark)
#todo: add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../documentation ${CMAKE_BINARY_DIR}/documentation)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../standalone ${CMAKE_BINARY_DIR}/standalone)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../documentation ${CMAKE_BINARY_DIR}/documentation)
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20)
# enable compiler warnings
if(NOT TEST_INSTALLED_VERSION)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(PPQSort INTERFACE -Wall -Wpedantic -Wextra -Werror)
target_compile_options(${PROJECT_NAME} PRIVATE -Werror -Wall -Wpedantic -Wextra)
elseif(MSVC)
target_compile_options(PPQSort INTERFACE /W4 /WX)
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX)
endif()
endif()

Expand Down

0 comments on commit 0de8aa9

Please sign in to comment.