more cmake

This commit is contained in:
James Cherry 2020-04-04 16:12:41 -07:00
parent 4a9a38f20a
commit 0a3dcbd476
3 changed files with 9 additions and 12 deletions

View File

@ -551,12 +551,6 @@ find_package(TCL)
# Zlib # Zlib
include(FindZLIB) include(FindZLIB)
# Translate cmake bool to StaConfig.h ifdef bool
if (ZLIB_FOUND)
set(ZLIB 1)
else()
set(ZLIB 0)
endif()
################################################################ ################################################################
# #
@ -675,10 +669,13 @@ target_link_libraries(sta
OpenSTA OpenSTA
sta_swig sta_swig
${TCL_LIBRARY} ${TCL_LIBRARY}
ZLIB ${ZLIB_LIBRARIES}
CUDD_LIB
) )
if (CUDD_LIB)
target_link_libraries(sta ${CUDD_LIB})
endif()
message(STATUS "STA executable: ${STA_HOME}/app/sta") message(STATUS "STA executable: ${STA_HOME}/app/sta")
# g++ std::thread apparently still needs -pthreads. # g++ std::thread apparently still needs -pthreads.

View File

@ -2,7 +2,7 @@
#define STA_GIT_SHA1 "${STA_GIT_SHA1}" #define STA_GIT_SHA1 "${STA_GIT_SHA1}"
#define ZLIB ${ZLIB} #cmakedefine ZLIB_FOUND
#define CUDD ${CUDD} #define CUDD ${CUDD}

View File

@ -21,11 +21,11 @@
#include "StaConfig.hh" // ZLIB #include "StaConfig.hh" // ZLIB
#if ZLIB #ifdef ZLIB_FOUND
#include <zlib.h> #include <zlib.h>
#else // ZLIB #else // ZLIB_FOUND
#include <stdio.h> #include <stdio.h>
@ -36,4 +36,4 @@
#define gzprintf fprintf #define gzprintf fprintf
#define Z_NULL nullptr #define Z_NULL nullptr
#endif // ZLIB #endif // ZLIB_FOUND