I'm playing around with bazel (rather new to it) and want to integrate one of my projects that needs to use cmake due to the use of JUCE.
I built a minimal example but I'm getting the error:
BUILD.bazel:5:6: output 'cmake_test/projectA/helloworldexec' was not created
my folder structure is
cmake_test
projectA
src
helloworld.cpp
BUILD.bazel
CMakeLists.txt
BUILD.bazel
WORKSPACE.bazel
WORKSPACE.bazel basically just sets up rules_foreign_cc
cmake_test/BUILD:
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_cc//cc:defs.bzl", "cc_test")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
cmake(
name = "projectA",
generate_args = ["-GNinja"],
lib_source = "//cmake_test/projectA:a_srcs",
out_binaries = ["helloworldexec"],
out_bin_dir = ""
)
cmake_test/projectA/BUILD
load("@rules_cc//cc:defs.bzl", "cc_library")
filegroup(
name = "a_srcs",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)
CMakeLists.txt
cmake_minimum_required(VERSION 2.23.0)
project(helloworld)
add_executable(helloworldexec src/helloworld.cpp)
helloworld.cpp is just a main function that couts hello world.
Why isn't this built?