diff options
author | Erwin Jansen <jansene@google.com> | 2019-03-19 03:53:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-03-19 03:53:51 +0000 |
commit | 47545cf35bda7e32a6209e5741a4ce5993fa524a (patch) | |
tree | 1b72ae3bc6ca0a0ce5e6aeb896b6e90a4665752b | |
parent | 4a2a75acdd294808dcccf5ce0d63f979655a7ae4 (diff) | |
parent | 729092b3f887a2e149329f14056163c850f4f33b (diff) | |
download | patched-yasm-emu-29.0-release.tar.gz |
Merge "Do not enable installation by default." into emu-master-devemu-29.0-release
-rw-r--r-- | CMakeLists.txt | 17 | ||||
-rw-r--r-- | frontends/tasm/CMakeLists.txt | 4 | ||||
-rw-r--r-- | frontends/vsyasm/CMakeLists.txt | 4 | ||||
-rw-r--r-- | frontends/yasm/CMakeLists.txt | 4 | ||||
-rw-r--r-- | libyasm/CMakeLists.txt | 72 | ||||
-rw-r--r-- | modules/CMakeLists.txt | 14 |
6 files changed, 66 insertions, 49 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 82f6c53..d58c7f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,9 +4,14 @@ if (COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif (COMMAND cmake_policy) + +# Clear out C Flags for this project, as our parent project has +# settings that will cause a lot of issues +SET(CMAKE_C_FLAGS "-O2") OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF) OPTION(ENABLE_NLS "Enable message translations" OFF) -OPTION(YASM_BUILD_TESTS "Enable building of tests" OFF) +OPTION(YASM_BUILD_TESTS "Enable building of tests" ON) +OPTION(YASM_INSTALL "Enable install" OFF) IF(YASM_BUILD_TESTS) ENABLE_TESTING() @@ -38,8 +43,10 @@ ADD_SUBDIRECTORY(libyasm) ADD_SUBDIRECTORY(modules) ADD_SUBDIRECTORY(frontends) -INSTALL(FILES - libyasm.h - ${CMAKE_BINARY_DIR}/libyasm-stdint.h - DESTINATION include +if (YASM_INSTALL) + INSTALL(FILES + libyasm.h + ${CMAKE_BINARY_DIR}/libyasm-stdint.h + DESTINATION include ) +endif() diff --git a/frontends/tasm/CMakeLists.txt b/frontends/tasm/CMakeLists.txt index e275ab8..d043abc 100644 --- a/frontends/tasm/CMakeLists.txt +++ b/frontends/tasm/CMakeLists.txt @@ -34,4 +34,6 @@ SET_SOURCE_FILES_PROPERTIES(tasm.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/license.c ) -INSTALL(TARGETS ytasm RUNTIME DESTINATION bin) +IF(YASM_INSTALL) + INSTALL(TARGETS ytasm RUNTIME DESTINATION bin) +ENDIF() diff --git a/frontends/vsyasm/CMakeLists.txt b/frontends/vsyasm/CMakeLists.txt index 6815b18..4bbff7b 100644 --- a/frontends/vsyasm/CMakeLists.txt +++ b/frontends/vsyasm/CMakeLists.txt @@ -34,4 +34,6 @@ SET_SOURCE_FILES_PROPERTIES(vsyasm.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/license.c ) -INSTALL(TARGETS vsyasm RUNTIME DESTINATION bin) +IF(YASM_INSTALL) + INSTALL(TARGETS vsyasm RUNTIME DESTINATION bin) +ENDIF() diff --git a/frontends/yasm/CMakeLists.txt b/frontends/yasm/CMakeLists.txt index b11d7f8..aa6a91d 100644 --- a/frontends/yasm/CMakeLists.txt +++ b/frontends/yasm/CMakeLists.txt @@ -31,4 +31,6 @@ SET_SOURCE_FILES_PROPERTIES(yasm.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/license.c ) -INSTALL(TARGETS yasm RUNTIME DESTINATION bin) +IF (YASM_INSTALL) + INSTALL(TARGETS yasm RUNTIME DESTINATION bin) +ENDIF() diff --git a/libyasm/CMakeLists.txt b/libyasm/CMakeLists.txt index f04673c..19c2a01 100644 --- a/libyasm/CMakeLists.txt +++ b/libyasm/CMakeLists.txt @@ -42,39 +42,41 @@ ELSE(BUILD_SHARED_LIBS) ) ENDIF(BUILD_SHARED_LIBS) -INSTALL(TARGETS libyasm - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - ) +IF (YASM_INSTALL) + INSTALL(TARGETS libyasm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) -INSTALL(FILES - arch.h - assocdat.h - bitvect.h - bytecode.h - compat-queue.h - coretype.h - dbgfmt.h - errwarn.h - expr.h - file.h - floatnum.h - hamt.h - insn.h - intnum.h - inttree.h - linemap.h - listfmt.h - md5.h - module.h - objfmt.h - parser.h - phash.h - preproc.h - section.h - symrec.h - valparam.h - value.h - DESTINATION include/libyasm - ) + INSTALL(FILES + arch.h + assocdat.h + bitvect.h + bytecode.h + compat-queue.h + coretype.h + dbgfmt.h + errwarn.h + expr.h + file.h + floatnum.h + hamt.h + insn.h + intnum.h + inttree.h + linemap.h + listfmt.h + md5.h + module.h + objfmt.h + parser.h + phash.h + preproc.h + section.h + symrec.h + valparam.h + value.h + DESTINATION include/libyasm + ) +ENDIf() diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index e3f8eb1..73a2bdf 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -73,7 +73,7 @@ IF(regen_init_plugin_c) FILE(APPEND ${INIT_PLUGIN_C} " yasm_register_module(YASM_MODULE_${_type}, \"${_keyword}\", &${_data});\n") ENDFOREACH(module) - FILE(APPEND ${INIT_PLUGIN_C} "}\n") + FILE(APPEND ${INIT_PLUGIN_C} "}\n") ELSE(regen_init_plugin_c) MESSAGE(STATUS "Not regenerating static modules file (unchanged)") ENDIF(regen_init_plugin_c) @@ -88,12 +88,14 @@ IF(BUILD_SHARED_LIBS) ${YASM_MODULES_SRC} ) TARGET_LINK_LIBRARIES(yasmstd libyasm) + IF(YASM_INSTALL) + IF(WIN32) + INSTALL(TARGETS yasmstd LIBRARY DESTINATION bin) - IF(WIN32) - INSTALL(TARGETS yasmstd LIBRARY DESTINATION bin) - ELSE(WIN32) - INSTALL(TARGETS yasmstd LIBRARY DESTINATION lib) - ENDIF(WIN32) + ELSE(WIN32) + INSTALL(TARGETS yasmstd LIBRARY DESTINATION lib) + ENDIF(WIN32) + ENDIF() ELSE(BUILD_SHARED_LIBS) ADD_LIBRARY(yasmstd init_plugin.c |