-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
41 lines (31 loc) · 970 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
project( spamm-miniapp Fortran C )
cmake_minimum_required( VERSION 2.8 )
include( FindFLEX )
if( NOT FLEX_FOUND )
message( FATAL_ERROR "I need the flex lexer" )
endif()
include( FindBISON )
if( NOT BISON_FOUND )
message( FATAL_ERROR "I need the bison parser generator" )
endif()
message( STATUS "Linking with ${FLEX_LIBRARIES}" )
set( PARSER_DEBUG FALSE
CACHE BOOL "Debug the input file parser" )
include( FindDoxygen )
if( DOXYGEN_FOUND )
configure_file( Doxyfile.in Doxyfile )
add_custom_target( doc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile )
else()
message( STATUS "Can not build documentation" )
endif()
if( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Debug )
endif()
if( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
set( CMAKE_C_FLAGS_DEBUG "-O0 -g" )
set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fcheck=all" )
endif()
add_subdirectory( src )
enable_testing()
add_test( parse1 ${CMAKE_BINARY_DIR}/mini-spamm test-1.inp )