cmake_minimum_required(VERSION 3.5) project(cmMod) set (CMAKE_CXX_STANDARD 14) include(GNUInstallDirs) add_library(cmModLib INTERFACE) target_compile_options(cmModLib INTERFACE $<$,$>:-DCMAKE_FLAG_ERROR_A> # Check discard = false INTERFACE "-DCMAKE_FLAG_REQUIRED_A" INTERFACE $<$>,$>>:-DCMAKE_FLAG_REQUIRED_B> INTERFACE $<$:-DCMAKE_FLAG_REQUIRED_C> INTERFACE $>,-DCMAKE_TRUE_FLAG,-DCMAKE_FALSE_FLAG> INTERFACE $,-DCMAKE_TGT_EXISTS,-DCMAKE_TGT_NEXISTS> INTERFACE $,-DCMAKE_PROP1_OK,-DCMAKE_PROP1_ERROR> INTERFACE $,-DCMAKE_PROP2_ERROR,-DCMAKE_PROP2_OK> ) target_include_directories(cmModLib INTERFACE $ $ ) set_target_properties(cmModLib PROPERTIES IMPORTED_NO_SONAME 1 IMPORT_SUFFIX 0 ) target_compile_definitions(cmModLib INTERFACE -DCMAKE_COMPILER_DEFINE_STR="compDef")