Skip to content

Commit

Permalink
Tests: No GNU Extensions
Browse files Browse the repository at this point in the history
Avoid passing `-std=c++11` and `-std=gnu++11` with this?
  • Loading branch information
ax3l committed Dec 18, 2018
1 parent 4a5f2a5 commit f37291e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ find_package(Catch2 2.4.0 CONFIG REQUIRED)
message(STATUS "Catch2: Found version ${Catch2_VERSION}")

add_library(CatchMain CatchMain.cpp)
# CMake 3.8.0+ feature:
# CMake 3.8.0+ feature: use at least C++11
# target_compile_features(CatchMain PUBLIC cxx_std_11)
set_target_properties(CatchMain PROPERTIES
# CXX_EXTENSIONS OFF
# CXX_STANDARD_REQUIRED ON
#CXX_STANDARD 11 # use exactly C++11
#CXX_EXTENSIONS OFF
#CXX_STANDARD_REQUIRED ON
POSITION_INDEPENDENT_CODE ON
WINDOWS_EXPORT_ALL_SYMBOLS ON
)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_compile_options(CatchMain PUBLIC "/bigobj")
endif()
target_link_libraries(CatchMain PUBLIC Catch2::Catch2)
target_include_directories(CatchMain SYSTEM PUBLIC
${Catch2_INCLUDE_DIRS})

# NVCC does not incorporate the COMPILE_OPTIONS of a target but only the CMAKE_CXX_FLAGS
IF(ALPAKA_ACC_GPU_CUDA_ENABLE AND NOT ALPAKA_CUDA_COMPILER MATCHES "clang")
Expand Down

0 comments on commit f37291e

Please sign in to comment.