File tree Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -119,17 +119,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
119119 list (APPEND LTC_C_FLAGS -no -undefined)
120120endif ()
121121
122- if (MSVC )
123- cmake_push_check_state()
124- set (CMAKE_REQUIRED_LIBRARIES bcrypt)
125- check_symbol_exists(BCryptGenRandom "Windows.h;bcrypt.h" BCRYPT_AVAILABLE)
126- cmake_pop_check_state()
127- if (BCRYPT_AVAILABLE)
128- target_link_libraries (${PROJECT_NAME} PRIVATE Bcrypt)
129- list (APPEND LTC_C_FLAGS -DLTC_WIN32_BCRYPT)
130- endif ()
131- endif ()
132-
133122# If the user set the environment variables at generate-time, append them in order to allow
134123# overriding our defaults.
135124# ~~~
@@ -160,6 +149,17 @@ set_target_properties(
160149 PUBLIC_HEADER "${PUBLIC_HEADERS} "
161150)
162151
152+ if (MSVC )
153+ cmake_push_check_state()
154+ set (CMAKE_REQUIRED_LIBRARIES bcrypt)
155+ check_symbol_exists(BCryptGenRandom "Windows.h;bcrypt.h" BCRYPT_AVAILABLE)
156+ cmake_pop_check_state()
157+ if (BCRYPT_AVAILABLE)
158+ target_link_libraries (${PROJECT_NAME} PRIVATE Bcrypt)
159+ list (APPEND LTC_C_FLAGS -DLTC_WIN32_BCRYPT)
160+ endif ()
161+ endif ()
162+
163163option (COMPILE_LTO "Build with LTO enabled" )
164164if (COMPILE_LTO)
165165 check_ipo_supported(RESULT COMPILER_SUPPORTS_LTO)
Original file line number Diff line number Diff line change @@ -21,9 +21,19 @@ build_script:
2121 cd..
2222 git clone https://github.com/libtom/libtommath.git --branch=master
2323 cd libtommath
24+ mkdir build
25+ cd build
26+ cmake -G "Ninja" ..
27+ ninja
28+ cd..
2429 nmake -f makefile.msvc
2530 cd..
2631 cd libtomcrypt
32+ mkdir build
33+ cd build
34+ cmake -G "Ninja" ..
35+ ninja
36+ cd..
2737 nmake -f makefile.msvc all
2838test_script :
2939- cmd : test.exe
You can’t perform that action at this time.
0 commit comments