hello,
My build step is not thread-safe (the instruction in the COMMAND part).
Every build step depends on one source file:
/add_custom_command(//
// DEPENDS on_source.file//
// OUTPUT//
// object_file_for_source_file//
// COMMAND not-thread-safe-compiler
I have an external CMake project that gets exported on install. The root
project uses it as a package. The external project must be installed
prior being used as a package.
I can solve this problem by using `ExternalProject` for both projects
and declare their dependency. My setup is different
s are expected to modify something
the external project’s build depends on in a way that is not
detectable via the step target dependencies (e.g. |SOURCE_DIR| is
used without a download method and developers might modify the
sources in |SOURCE_DIR|).
Am 24.09.19 um 15:23 schrieb hex:
hello,
I have a problem with a build step.
The following command is run every time somefile changes:
add_custom_command( OUTPUT out.put
COMMAND touch out.put
DEPENDS somefile.txt
)
add_custom_target( sometarget DEPENDS out.put )
I move this snippet inside an external project (with
E
.in:
/set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)/
with:
/list(APPEND CMAKE_C_SOURCE_FILE_EXTENSIONS c;m )/
?
On 30/08/2019 12:41, hex wrote:
I am still facing a problem: The build step is skipped only the link
step is performed (I missed that in the beginning). It seems like the
build step does not have any de
I am still facing a problem: The build step is skipped only the link
step is performed (I missed that in the beginning). It seems like the
build step does not have any dependencies.
This is because different file extension are used. I cannot set
CMAKE_C_SOURCE_FILE_EXTENSIONS because I believ
thank you this is exactly what I am looking for. It is working well.
From the documentation:
«It is loaded after CMake’s builtin compiler and platform information
modules have been loaded but before the information is used.»
since CMakeCInformation.cmake:
# compile a C file into an object file
thank you this is exactly what I am looking for. It is working well.
From the documentation:
«It is loaded after CMake’s builtin compiler and platform information
modules have been loaded but before the information is used.»
since CMakeCInformation.cmake:
# compile a C file into an object fi
thank you this is exactly what I am looking for. It is working well.
From the documentation:
«It is loaded after CMake’s builtin compiler and platform information
modules have been loaded but before the information is used.»
since CMakeCInformation.cmake:
# compile a C file into an object fi
hello community,
CMake builds a C project with /gcc -o target_name/. I have a compiler
very similar to GCC and I am trying configure CMake C language for it.
The compiler does not support the -o argument when linking objects. I
wonder if there is a way to remove or modify this argument, may
hello community,
Following an example on the usage of IMPORTED_OBJECTS from the book
"Professional CMake"
I receive the following error:
/Error evaluating generator expression://
//
// $//
//
// Expression did not evaluate to a known generator expression/
I wonder if there is a mistake
dear community,
I want to make a module for a language that is not supported by CMake.
are there any restrictions in using *add_executable* for any language
other than C / C++,
must the build be constructed very similar to C language?
I was looking into Java module for reference and noted th
toolchain file is ignored
once CMake has run and has done compiler detection.
On Wed, Jul 17, 2019 at 11:29 AM hex wrote:
I specified my toolchain like so:
1cmake -DCMAKE_TOOLCHAIN_FILE=myToolchain.cmake ..
and created a toolchain file in project/myToolchain.cmake.
Using relative path CMake
I specified my toolchain like so:
1|cmake -DCMAKE_TOOLCHAIN_FILE=myToolchain.cmake .. |//
and created a toolchain file in|project/myToolchain.cmake|.
Using relative path CMake first looks relative to the top of the build
directory, then if not found there, relative to the top of the source
di
hello community,
I am receiving a|fatal error: foobar_version.h: No such file or
directory|for|foobar_version.h|. The reason is that the source file is
generated in|${CMAKE_CURRENT_BINARY_DIR}/foobar_version.cpp|while the
header file is in|${CMAKE_CURRENT_SOURCE_DIR}|as seen here:
1234|confi
hello community,
Does anyone have a book recommendation for modern CMake with focus on
design patterns?
thank you
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CM
When I use CMAKE_BINARY_DIR the problem remains. If I
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin ) in my external project
the binary is placed in build/ext1-prefix/src/ext1-build/bin/.
Wouldn't it be better to have all my binaries in a single location? Such as
build/bin/ ? The only way
> Except for my generators
well, to be exact it's not /except for/ . I am using multiple generators
which means multiple copies of build targets.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers
I don't know what sorts of files those are; they don't exist but they
get created, they're not tracked, and not installed...
They sounds like a build product, which is a target, (even it it's just
part of a product, it's still a target)
Exactly, these are mostly BYPRODUCTS, but also OUTPUT of
On 09/07/2019 18:25, J Decker wrote:
On Tue, Jul 9, 2019 at 9:38 AM hex <mailto:hex...@gmail.com>> wrote:
I think the better solution now is to make it relative to build
directory and force out of source builds.
+1 I think; You said it was generated? It should be in
thank you J Decker for your reply.
Your suggestion does work but I want to preserve standalone use of the
project, meaning that I want a reference to CMake source root directory.
Assuming there is only 1 hierarchy I could add an option:
if ( SUPERBUILD )
/message("${CMAKE_SOURCE_DIR}/.. =
hello CMake community,
I am experimenting with external projects. I have some files in an
external project which are generated in `${CMAKE_SOURCE_DIR}`.
When I add the external project, however, it is using
`${CMAKE_SOURCE_DIR}` of the external project.
I need `${CMAKE_SOURCE_DIR}` to be
hello CMake community,
I am experimenting with external projects. I have documentation in an
external project which is generated in `${CMAKE_CURRENT_SOURCE_DIR}`.
When I add the external project, however, it is using
`${CMAKE_CURRENT_SOURCE_DIR}` of the "super build".
I need `${CMAKE_CUR
there was a merge conflict on the submodule. Fixing the issue resolved
the problem.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
informat
hello CMake community,
I am using a private git repository with SSH URL with two different git
remote server. The repository on github is using an git submodule on
bitbucket.
/include( ExternalProject )//
//
//ExternalProject_Add(test//
// GIT_REPOSITORY g...@github.com:myuser/myprivater
hello,
I'd like to install CMake under /usr/local/cmake/3.15/bin/ or similar.
Is it possible to add the version number to a build option, like
-DCMAKE_INSTALL_PREFIX
or do I need to modify CMake sources?
thank you
--
Powered by www.kitware.com
Please keep messages on-topic and check the
In cmake mark_as_advanced will not display variables in any of the cmake
GUIs unless the show advanced option is on.
I wonder if there is an equivalent for build targets?
I have a bunch of custom_targets custom_a, custom_b, custom_c, ... which
all depend on custom_all
I don't want all target
Without cycling dependencies you can do something like this:
/add_executable(test_object_lib_nesting main.cpp)//
//
//target_link_libraries(test_object_lib_nesting//
// second_object_lib//
// first_object_lib//
//)/
The problem I have that the linker command line will have only the
second
hello Eric,
Some of my recent changes prevented my function to add a build target.
It was building either one or the other but not both. Therefore, half of
the tests where missing.
You are right it is working correctly now.
thank you for your patience.
This should work at least it "works-fo
hello,
I have two modules in my CMake project:
/root//
//├── foo//
//│ ├── CMakeLists.txt//
//│ ├── src//
//│ │ └── foo.c//
//│ └── tests//
//│ ├── foo_unit_test.c//
//│ └── CMakeLists.txt//
//├── CMakeLists.txt//
//└── moo//
// ├── CMakeLists.txt//
// ├── src//
//
The function is defined as
*add_custom_target(Name [ALL] [command1 [args1...]]**
** [COMMAND command2 [args2...] ...]**
** [DEPENDS depend depend depend ... ]**
** [BYPRODUCTS [files...]]**
** [WORKING_DIRECTORY dir]**
** [COMMENT comment]**
** [VERBATIM] [USES_TERMINAL]**
** [COMMA
I didn't know about Tclsh. I see now it is part of TCL. This is useful,
thank you.
Probably because the following isn't properly set if you don't enable
a language:
CMAKE_FIND_LIBRARY_SUFFIXES
CMAKE_FIND_LIBRARY_PREFIXES
You could probably just use "find_package(Tclsh)" to just find the shell
hello,
I am setting up a TCL project so I disabled all language variables:
*cmake_minimum_required(VERSION 2.4)**
**
**project(P LANGUAGES NONE)**
**find_package(TCL)*
however, this fails with
*-- Could NOT find TCL (missing: TCL_LIBRARY) **
**-- Could NOT find TCLTK (missing: TCL_LIBRARY TK_
ummh, sooo... h, do you like... cheese?
On 5/9/19 7:21 AM, Stefan Fendt wrote:
Am 07.05.2019 um 20:37 schrieb Angel Campoverde:
Next time please ask what computer I am using.
*What*? Really? *Please* give this a second thought...
Stefan
--
Powered by www.kitware.com
Please keep messages o
set the compiler for each build:
set(COMPILER /opt/gcc/bin)
cmake_force_c_compiler( "${COMPILER}gcc" GNU)
cmake_force_cxx_compiler("${COMPILER}g++" GNU)
--
Sent from: http://cmake.3232098.n2.nabble.com/
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
hello,
I am using the following command to add a git submodule to an existing
repository:
add_custom_command(OUTPUT fetch
COMMAND git submodule add https://github.com/user/repo.git
)
add_custom_target(new DEPENDS fetch)
This is working as intended. Adding an already existing submodule
I see now the generators are part of CMake sources on gitlab...
that answers my questions.
thank you, Zan Lynx.
On March 11, 2019 6:03:24 PM MDT, hex wrote:
Another question, I didn't know there is a generator for sublime text 2:
https://cmake.org/cmake/help/latest/generator/Su
oject is already configured for the standard build targets normally used.
If I had a new build target at some point, like `make doxygen` I'd
probably edit the project manually and add it.
On 12/03/19 03:00, Zan Lynx wrote:
On March 11, 2019 6:03:24 PM MDT, hex wrote:
hi everyone,
Ther
hi everyone,
There are many generators supported in CMake. A CMake build system
allows me to generate the preferred build environment for everyone,
visual studio, eclipse, ninja you name it.
The problem I see with this is that projects are generated output files,
and even if that gives every
hello community,
During compilation, cmake shows the information message
*Dependee "DependInfo.cmake" is newer than depender "depend.internal".*
to explain why a file needs to be recompiled.
imediately after
* -- Build files have been written to: ./build**
** /usr/bin/cmake -H. -B./buil
dear community,
This question has originally been placed in another community [1].
I did read the mailing list netiquette before posting here but I was not
aware this behaviour is discouraged.
Therefore, I want to apologize. Good etiquette is important, I am
grateful for any advice on how I can
hello,
I am trying to include a static library that contains the startup code
for ARM processor to my CMake project for cross compilation.
I included the linker script and added it to the executable. Flags and
include files are properly set in the CMake build output. The path to
the library
hello,
I want to use CMake as my primary build system. At some point I would
like to take advantage of the tools provided by IDEs, such as stepping
through code.
I know I can use CMake to generate an eclipse project, or use Eclipse to
generate a CMake project. My doubt is whether these optio
good afternoon,
I am following the CMake book to learn about CMake. I have trouble to
follow chapter 3: build configurations
(https://riptutorial.com/cmake/example/26702/setting-a-release-debug-configuration)
In this part it is not very clear why these configurations are used,
and how they w
44 matches
Mail list logo