diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3156c0d..64b661c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,27 +2,21 @@ cmake_minimum_required(VERSION 2.8.11) project(ecgen) set(CMAKE_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/lib) - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -Wall -Werror -pedantic") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -Wall") -add_custom_command( - OUTPUT gp.c gp.h - COMMAND gp2c -g -i4 gp/gp.gp | clang-format | awk "BEGIN{print \"#ifndef GP_H\" > \"gp.h\"; print \"#define GP_H\" >> \"gp.h\";} { if\(found\) print >> \"gp.c\"; else print >> \"gp.h\"} /End of prototype/{found=1; print \"\#include \\\"gp.h\\\"\" > \"gp.c\"; print \"#endif //GP_H\" >> \"gp.h\"}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src" - COMMENT "gp2c gp.gp" - VERBATIM -) - -add_custom_target(gp2c ALL DEPENDS gp.c gp.h) - include_directories(src) include_directories(lib) -file(GLOB ECGEN_SRC "src/ecgen.c" "src/math/*.c" "src/cm/*.c" "src/invalid/*.c" "src/io/*.c" "src/exhaustive/*.c" ) +find_library(parson parson/libparson.a) +find_library(sha1 sha1/libsha1.a) -add_executable(ecgen ${ECGEN_SRC}) +file(GLOB SRC "src/math/*.c" "src/cm/*.c" "src/invalid/*.c" "src/io/*.c" "src/exhaustive/*.c") +set(ECGEN_SRC "src/ecgen.c" ${SRC}) +set(ECONVERT_SRC "src/econvert.c" ${SRC}) -find_library(parson parson/libparson.a) +add_executable(ecgen ${ECGEN_SRC}) +add_executable(econvert ${ECONVERT_SRC}) -target_link_libraries(ecgen pari rt ${parson})
\ No newline at end of file +target_link_libraries(ecgen pari rt ${parson} ${sha1}) +target_link_libraries(econvert pari rt ${parson} ${sha1})
\ No newline at end of file |
