[CMake] Port from Debian to Windows: Include files not found

Randy Turner randallsturner13 at gmail.com
Mon Sep 21 08:38:41 EDT 2015


Thanks for all of the input, everyone! Unfortunately the problem still
persists. I don't have much to report this morning. I've removed the calls
to build the assembly file and confirmed that it is an ASM vs C issue as
opposed to an ordering issue. It continued to attempt to build the C file
without calls to include relevant directories and fails at the first
include.

On Fri, Sep 18, 2015 at 3:49 PM, Pau Garcia i Quiles <pgquiles at elpauer.org>
wrote:

> Hello,
>
> You may need something like this in the toolchain file:
>
> # search for programs in the build host directories
> SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
>
> # for libraries and headers in the target directories
> SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
> SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
>
> set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
>
>
> On Fri, Sep 18, 2015 at 7:22 PM, Randy Turner <randallsturner13 at gmail.com>
> wrote:
>
>> I am having trouble building a Code Composer Studio project with CMake.
>> Executing from the same directory in Linux compiles successfully, but in
>> Linux it fails to find any included files that aren't in the same directory
>> as the .c file that it's building. I can provide a relative path to help it
>> move on, but it will just fail to find the files referenced by that one.
>>
>> The very first #include of the project is <stdbool.h> which is located in
>> the compiler's install files. As shown in my StackOVerflow question about
>> this issue (
>> http://stackoverflow.com/questions/32591626/cmake-header-files-cannot-be-opened)
>> I can confirm that the files are in the directory that is included in the
>> CMakeLists.txt file and can be found while CMake is executing, but fail to
>> be located by make. I am using MinGW's make, and using the commands make
>> and mingw32-make both ellicit the same result, "fatal error: could not open
>> source file "stdbool.h" (no directories in search list)."
>>
>> Is there something that I'm missing here? Is something else necessary
>> beyond using INCLUDE_DIRECTORIES for all of the directories in the project?
>>
>> --
>>
>> 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
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>>
>
>
>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150921/e2e78f6b/attachment.html>


More information about the CMake mailing list