cc.cmake 588 B

123456789101112131415161718
  1. # -*- coding: utf-8; mode: cmake -*-
  2. # (c) Daniel Llorens - 2018-2019
  3. # Common include section for subdirs
  4. set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/")
  5. set (BASE_CXXFLAGS "-std=c++20 -Wall -Werror -fdiagnostics-color=always -Wno-unknown-pragmas \
  6. -finput-charset=UTF-8 -fextended-identifiers -Wno-error=strict-overflow \
  7. -Werror=zero-as-null-pointer-constant")
  8. set (CMAKE_CXX_FLAGS "${BASE_CXXFLAGS} $ENV{CXXFLAGS}")
  9. foreach (target ${TARGETS})
  10. add_executable (${target} "${target}.cc")
  11. add_test (${target} ${target})
  12. endforeach ()
  13. enable_testing ()