cmake_minimum_required (VERSION 2.6) project (stick) if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi") set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed" ) endif() set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG") if(CMAKE_BUILD_TYPE STREQUAL "Release") # CMAKE_C_FLAGS_RELEASE is appended, but we need to prepend -O2 to take # effect set(CMAKE_C_FLAGS "-O2 ${CMAKE_C_FLAGS}") endif() set(PACKAGE_STRING stick) set(PACKAGE_BUGREPORT stefan.huber@ist.ac.at) set(PACKAGE_VERSION 0.1) if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99") # I would like to use -pedantic, but VTK devs are not sufficiently # pedantic set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") endif() add_subdirectory(include) add_subdirectory(lib) add_subdirectory(src)