Different target Names "blaze" and "Blaze" in Blaze_Import.cmake trigger cmake error

Issue #406 resolved
Nils-Christian Kempke created an issue


I tried to include blaze into my project and ran into an issue.

I cloned the blaze repository via

git clone https://nckempke@bitbucket.org/blaze-lib/blaze.git

and afterwards tried to include it into my project via



target_link_libraries(TARGET Blaze)

as described in the wiki. I used the default suggested arguments slightly modified:

        BLAS on
        LAPACK on
        THREADING OpenMP
        CACHE_SIZE auto
        STORAGE_ORDER rowMajor

Changes are link OpenMP, REQUIRED and DEBUG instead of QUIET.

This setup triggered the following cmake error:

-- Configuring blaze version .
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
CMake Error at blaze/cmake/Blaze_Import.cmake:244 (target_compile_options):
  Cannot specify compile options for target "blaze" which is not built by
  this project.
Call Stack (most recent call first):
  CMakeLists.txt:10 (Blaze_Import)

CMake Error at blaze/cmake/Blaze_Import.cmake:246 (target_link_libraries):
  Cannot specify link libraries for target "blaze" which is not built by this
Call Stack (most recent call first):
  CMakeLists.txt:10 (Blaze_Import)

-- Configuring incomplete, errors occurred!
See also "/home/nils-christian/test/build/CMakeFiles/CMakeOutput.log".
See also "/home/nils-christian/test/build/CMakeFiles/CMakeError.log".

I checked the respective lines in the Blaze_Import.cmake file and found that indeed, while the library Blaze defined here has an upper case ‘B' the target_links here refer to blaze with a lower case 'b’.

Blaze with lower case is actually used at multiple locations (e.g. here which then should all trigger cmake fails if used).

I fixed that problem by renaming the lower case targets “blaze” to “Blaze”.

I might have done something wrong and attached a minimal example (including a dummy main, a dummy CMakeLists.txt and a folder “blaze” which is a placeholder for the git clone).

All the best,


Comments (5)

  1. Klaus Iglberger

    Hi Nils!

    Thanks a lot for pointing out this defect. I wonder why this problem didn’t surface before and therefore very much appreciate the help. I’ll fix the problem as quickly as possible.

    Best regards,


  2. Klaus Iglberger

    Commit a46b53b fixes the spelling issues in the Blaze_Import.cmake file. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.9.

  3. Log in to comment