0639b4b0c4
* remove IS_TOPLEVEL_PROJECT cmake variable from top level * rework example/CMakeLists.txt with generator expressions * rework test/CMakeLists.txt with generator expressions * fix unknown cxx_std_20 on certain cmake versions * update test_package/CMakeLists.txt with modern cmake
13 lines
415 B
CMake
13 lines
415 B
CMake
# set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
|
add_executable(example example.cpp)
|
|
target_link_libraries(example PRIVATE nameof::nameof)
|
|
set_target_properties(example PROPERTIES CXX_EXTENSIONS OFF)
|
|
|
|
target_compile_options(example
|
|
PRIVATE
|
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
|
|
-Wall -Wextra -pedantic-errors -Werror>
|
|
$<$<CXX_COMPILER_ID:MSVC>:
|
|
/W4 /WX>
|
|
)
|