search for: add_executable

Displaying 20 results from an estimated 40 matches for "add_executable".

2017 Jul 20
3
FYI: Ninja-build user may use CMake-3.9
...ce files in dependent targets may now compile without waiting for their targets’ dependencies to link. With BUILD_SHARED_LIBS, compiling units don't wait for preceding shared libs. See also; http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux Regardless of BUILD_SHARED_LIBS, compile units in add_executable() don't wait for preceding libraries, but targets by add_dependencies(). It doesn't break anything in llvm tree. Assume; add_executable(foo foo.cpp) target_link_libraries(foo LLVMCore) # depends on intrinsics_gen Compiling foo.cpp doesn't wait for LLVMCore, but intrinsics_gen. Link...
2017 Jul 20
2
FYI: Ninja-build user may use CMake-3.9
...; without waiting for their targets’ dependencies to link. >> >> With BUILD_SHARED_LIBS, compiling units don't wait for preceding shared >> libs. >> See also; http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux >> Regardless of BUILD_SHARED_LIBS, compile units in add_executable() don't >> wait for preceding libraries, >> but targets by add_dependencies(). >> >> It doesn't break anything in llvm tree. Assume; >> add_executable(foo foo.cpp) >> target_link_libraries(foo LLVMCore) # depends on intrinsics_gen >> Compiling f...
2014 Feb 27
3
[LLVMdev] Understanding some of the recent cmake build changes
I was a bit confused with what the difference was between the old target_link_libraries(foo bar) and the new target_link_libraries(foo INTERFACE|PRIVATE|PUBLIC bar) To try to find out, I decided to look at the generated build.ninja. The difference that shows up is far fewer order only dependencies. For example build lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o: CXX_COMPILER
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
...ngineBuilder(std::move(Owner)).create() keeps return null, any idea why? Here's my CMakeList: cmake_minimum_required(VERSION 3.12) project(llvm_test) set(CMAKE_CXX_STANDARD 14) find_package(LLVM REQUIRED CONFIG) llvm_map_components_to_libnames(llvm_libs support core irreader orcjit native) add_executable(llvm_test main.cpp) target_include_directories(llvm_test PUBLIC ${LLVM_INCLUDE_DIRS}) target_compile_definitions(llvm_test PUBLIC ${LLVM_DEFINITIONS}) target_link_libraries(llvm_test ${llvm_libs}) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm....
2010 Sep 09
2
[LLVMdev] [PATCH][CMake] Removing LLVMLibDeps.cmake and exporting libraries for CMake clients.
...ists.txt file for the component. The attached patches remove this requirement, and add real CMake package export capabilities. A CMake user wishing to use LLVM can now use something similar to this: cmake_minimum_required(VERSION 2.8) find_package(LLVM REQUIRED) add_definitions(${LLVM_CXXFLAGS}) add_executable(llvm-external-test llvm-external-test.cpp) target_link_libraries(llvm-external-test ${LLVM_SYSTEM_LIBS} ${LLVM_JIT_LIBS} ${LLVM_NATIVECODEGEN_LIBS}) llvm+clang compile with these changes on both Linux and MSVS. Currently both patches must be applied at the same time. I can refactor them into a 3 s...
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
...ny idea > why? > > Here's my CMakeList: > > cmake_minimum_required(VERSION 3.12) > project(llvm_test) > > set(CMAKE_CXX_STANDARD 14) > > find_package(LLVM REQUIRED CONFIG) > llvm_map_components_to_libnames(llvm_libs support core irreader orcjit native) > > add_executable(llvm_test main.cpp) > target_include_directories(llvm_test PUBLIC ${LLVM_INCLUDE_DIRS}) > target_compile_definitions(llvm_test PUBLIC ${LLVM_DEFINITIONS}) > target_link_libraries(llvm_test ${llvm_libs}) > > _______________________________________________ > LLVM Developers mailing...
2010 Sep 09
0
[LLVMdev] [PATCH][CMake] Removing LLVMLibDeps.cmake and exporting libraries for CMake clients.
...tached patches remove this requirement, and add real CMake > package export capabilities. A CMake user wishing to use LLVM can now > use something similar to this: > > cmake_minimum_required(VERSION 2.8) > > find_package(LLVM REQUIRED) > add_definitions(${LLVM_CXXFLAGS}) > add_executable(llvm-external-test llvm-external-test.cpp) > target_link_libraries(llvm-external-test ${LLVM_SYSTEM_LIBS} > ${LLVM_JIT_LIBS} ${LLVM_NATIVECODEGEN_LIBS}) > > llvm+clang compile with these changes on both Linux and MSVS. > Currently both patches must be applied at the same time. I can...
2010 Nov 03
6
[LLVMdev] LLVM Cmake module?
...System/DataTypes.h" >> make[2]: *** [CMakeFiles/jllvm.dir/Analysis_wrap.c.o] Error 1 >> make[1]: *** [CMakeFiles/jllvm.dir/all] Error 2 >> make: *** [all] Error 2 Yes, you must define __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS on your CMakeLists.txt. Put this before any add_executable/add_library that contains source files that uses LLVM stuff: add_definitions( -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS )
2017 May 29
0
[PATCH] Add CMake build script
...eex/kiss_fft.h + libspeex/kiss_fftr.c + libspeex/kiss_fftr.h) +endif() +if(VORBIS_PSYCHO) + target_sources(speex PRIVATE + libspeex/vorbis_psy.h + libspeex/vorbis_psy.c) +endif() + +# Programs + +if(NOT DISABLE_BINARIES) + +SET(speexenc_SOURCES + src/speexenc.c + src/wav_io.c + src/skeleton.c) +add_executable(speexenc ${speexenc_SOURCES}) +target_include_directories(speexenc + PRIVATE + $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> + $<BUILD_INTERFACE:${OGG_INCLUDE_DIRS}> + $<BUILD_INTERFACE:${SPEEXDSP_INCLUDE_DIRS}>) +target_link_libraries(speexenc + PUBLIC speex ${OGG_LIBRARIES}...
2010 Nov 04
0
[LLVMdev] LLVM Cmake module?
...uot; >>> make[2]: *** [CMakeFiles/jllvm.dir/Analysis_wrap.c.o] Error 1 >>> make[1]: *** [CMakeFiles/jllvm.dir/all] Error 2 >>> make: *** [all] Error 2 > Yes, you must define __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS on > your CMakeLists.txt. Put this before any add_executable/add_library that > contains source files that uses LLVM stuff: > > add_definitions( -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS )
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...quot;${CMAKE_CURRENT_SOURCE_DIR}/l > lvm/cmake$ > > message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") > message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") > > include_directories(${LLVM_INCLUDE_DIRS}) > add_definitions(${LLVM_DEFINITIONS}) > > add_executable(simple-tool main.cpp) > > llvm_map_components_to_libnames(llvm_libs support) > > target_link_libraries(simple-tool ${llvm_libs}) > > > Here part of the cmake output in terminal: > > CMake Error at CMakeLists.txt:4 (find_package): > Could not find a package configurat...
2008 Nov 14
0
[LLVMdev] bugs in CMake build
...INK_COMPONENTS by external projects. Thus, in your project, you could do something like: set(LLVM_MAIN_SRC_DIR /path/to/llvm/sources) list(APPEND CMAKE_MODULE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) include(LLVMClientMacros) LLVM_LINK_COMPONENTS(bitreader bitwriter [... other llvm components]) add_executable(your_executable etc) link_llvm_componets(your_executable) and the libraries needed by the components you listed would be compiled and added to your executable. >> If you find more problems, please report them on >> http://www.llvm.org/bugs/ > > Well, for issues like the patch i...
2016 Oct 09
3
Embedding llvm as a git submodule in Project
Hi all. I want to use llvm in my project and I want to make llvm a git submodule in my project. http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project At this in the documentation it claims to describe how to embed llvm into a project. I tried it that way but it doesn't work, because there isn't any findLLVM.cmake in the llvm/cmake/modules directory anymore (i don't
2020 May 15
2
Building A Project Against LLVM
...RD_REQUIRED True) add_compile_options(-Wall) find_package(LLVM 10.0.0 REQUIRED CONFIG) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") include_directories(${LLVM_INCLUDE_DIRS}) add_definitions(${LLVM_DEFINITIONS}) add_executable(CBreakCompiler src/main.cpp src/Parser.cpp src/SourceTokenizer.cpp src/IRCompiler.cpp src/CompiledOutput.cpp) llvm_map_components_to_libnames(llvm_libs all) target_link_libraries(CBreakCompiler ${llvm_libs}) And a snippet from the cmake output corresponding to those message l...
2010 Feb 10
1
[LLVMdev] llvm in a subdirectory with cmake
Hi All, The proposed patch makes possible to use LLVM's CMake build infrastructure (most importantly add_llvm_library and add_llvm_executable macros) from the project that has llvm in a subdirectory. For example: demo/ llvm/ demo.cpp CMakeLists.txt where CMakeLists.txt is as follows: # ----------------------------- Start of CMakeLists.txt
2010 Dec 23
1
[LLVMdev] Linking to LLVM with CMake
...9;m having problems linking my project (outside of the llvm source tree) to the LLVM jit. My CMake file contains: ------------ find_package(LLVM REQUIRED) include_directories(${LLVM_INCLUDE_DIR}) link_directories(${LLVM_LINK_DIR}) add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS) add_executable(nvm main.cpp) llvm_config(nvm engine) ------------ cmake succeeds in generating the makefile - so it is correctly finding the installed LLVM (2.8, r122491), which compiled fine. The build fails, complaining of: CMakeFiles/nvm.dir/main.cpp.o: In function `global constructors keyed to main': m...
2013 Feb 08
1
[LLVMdev] Cmake sample standalone project
Hi! When using LLVM there is a folder: llvm/projects/sample which contains a file structure aimed at developing own project. It seems it uses autotools. Is there anywhere such structure but cmake oriented? So I can use it to build my project as standalone project? I know I can make simple cmakes like in llvm/examples/... directories, but then I have to execute cmake from llvm source everytme I
2019 May 09
0
CMake improvement suggestion
...ree. For example: cmake_minimum_required(VERSION 3.14) project(opus-example VERSION 0.0.1 LANGUAGES CXX) option(USE_SYSTEM_OPUS "Use the system opus" OFF) if (USE_SYSTEM_OPUS) find_package(Opus REQUIRED) else () add_subdirectory(${PROJECT_SOURCE_DIR}/dependencies/opus) endif() add_executable(example ${PROJECT_SOURCE_DIR}/src/example.cpp) target_link_libraries(example PRIVATE Opus::opus) Using find_package to find Opus will create the Opus::opus target, but adding the source code directly only adds opus. Aliasing opus to Opus::opus lets you keep the target_link_libraries line the same...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...gt;> lvm/cmake$ >> >> message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") >> message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") >> >> include_directories(${LLVM_INCLUDE_DIRS}) >> add_definitions(${LLVM_DEFINITIONS}) >> >> add_executable(simple-tool main.cpp) >> >> llvm_map_components_to_libnames(llvm_libs support) >> >> target_link_libraries(simple-tool ${llvm_libs}) >> >> >> Here part of the cmake output in terminal: >> >> CMake Error at CMakeLists.txt:4 (find_package): >&g...
2020 May 16
2
Building A Project Against LLVM
...gt; > find_package(LLVM 10.0.0 REQUIRED CONFIG) > > message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") > message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") > > include_directories(${LLVM_INCLUDE_DIRS}) > add_definitions(${LLVM_DEFINITIONS}) > > add_executable(CBreakCompiler > src/main.cpp > src/Parser.cpp > src/SourceTokenizer.cpp > src/IRCompiler.cpp > src/CompiledOutput.cpp) > > llvm_map_components_to_libnames(llvm_libs all) > target_link_libraries(CBreakCompiler ${llvm_libs}) > > > And a snippet fr...